{template "content","header"}
<?php
$picurl = $picurl ? $picurl : $pictureurls[0]['url'];
$alt = $alt ? $alt : $pictureurls[0]['alt'];
$next_url = $next_url ? $next_url : $GLOBALS['pic']['pageurls'][2][0];
$prev_url = $prev_url ? $prev_url : $previous_page['url'];
?>
<style type="text/css" >
.photo_prev a{cursor:url({IMG_PATH}v9/prev.cur), auto;}
.photo_next a{cursor:url({IMG_PATH}v9/next.cur), auto;}

</style>
<div class="main photo-channel">
        <div class="crumbs"><a href="{siteurl($siteid)}">首页</a><span> > {catpos($catid)}</div>
    <div id="Article">
                <h1>{$title}<br />
                        <span>{$inputtime}&nbsp;&nbsp;&nbsp;来源：{$copyfrom}&nbsp;&nbsp;&nbsp;评论：<a href="#comment_iframe" id="comment">0</a></span></h1>
<div class="tool">
                <a name="pic"></a>
        <a class="up" href="javascript:;" title="上一张" onclick="showpic('pre')"><span>上一张</span></a><a class="next" href="javascript:;" onclick="showpic('next')" title="下一张"><span>下一张</span></a><span class="stat" id="picnum"></span>

</div>
    <div class="big-pic" style="height:650px;">
                <div id="big-pic"><img src="{$picurl}" alt="{$alt}" /></div>
            <div class="photo_prev"><a id="photoPrev" title="&lt;上一页" class="btn_pphoto" target="_self" hidefocus="true" href="{$prev_url}" ></a></div>
        <div class="photo_next"><a id="photoNext" title="下一页&gt;"class="btn_nphoto" target="_self" hidefocus="true" href="{$next_url}" ></a></div>
        <a href="{$picurl}" class="max">查看原图</a>
        
        <div id="endSelect" style="display: none;">
                        <div id="endSelClose" onclick="$('#endSelect').hide();"></div>
                        <div class="bg"></div>
                        <div class="E_Cont">
                                <p>您已经浏览完所有图片</p>
                                <p><a id="rePlayBut" href="javascript:void(0)" onclick="showpic('next', 1);"></a><a id="nextPicsBut" href="{$next_page[url]}"></a></p>        
                        </div>
                </div>
        
    </div>

    <div class="list-pic">
        <div class="pre picbig">
                <div class="img-wrap"><a href="{$previous_page[url]}"><img src="{thumb($previous_page[thumb], 100, 137, 0)}" title="{$previous_page[title]}"></a></div><a href="{$previous_page[url]}">&lt;上一组</a>
        </div>
        <a href="{$prev_url}" class="pre-bnt"><span></span></a>
                <div class="cont" style="position:relative">
                        <ul class="cont picbig" id="pictureurls"  style="position:absolute">
                        {loop $pictureurls $pic_k $r}
                         <li><div class="img-wrap"><a href="{$r['httpurl']}" hidefocus="true"><img src="{thumb($r[url], 100, 137, 0)}" alt="{$r[alt]}" rel="{$r[url]}"/></a></div></li>
                        {/loop}
                        </ul>
                </div>
        <a href="{$next_url}" class="next-bnt"><span></span></a>
        <div class="next picbig">
                <div class="img-wrap"><a href="{$next_page[url]}" title="{$next_page[title]}"><img src="{thumb($next_page[thumb], 100, 137, 0)}"></a></div><a href="{$next_page[url]}">下一组&gt;</a>
        </div>
    </div>
            <div class="text" id="picinfo"></div>
        <div class="content">
                {$content}
        </div>
  </div>
  <div class="bk10"></div>
        <div class="relevance">
        <h5>相关图集</h5>

                {pc:content action="relation" relation="$relation" id="$id" catid="$catid" num="6" keywords="$rs[keywords]"}
                        <ul class="photo-list">
                                {loop $data $r}
                                <li><div class="img-wrap"><a href="{$r[url]}"><img src="{thumb($r[thumb])}" width="100" height="86"/></a></div><a href="{$r[url]}">{$r[title]}</a></li>
                                {/loop}
                        </ul>
                {/pc}
        </div>
  <div class="bk10"></div>
  {if $allow_comment && module_exists('comment')}
  <iframe src="{APP_PATH}index.php?m=comment&c=index&a=init&commentid={id_encode("content_$catid",$id,$siteid)}&iframe=1" width="100%" height="100%" id="comment_iframe" frameborder="0" scrolling="no"></iframe>
  {/if}
</div>
<div id="load_pic" style="display:none;" rel="{IMG_PATH}msg_img/loading_d.gif">
</div>
<script language="JavaScript">

        function add_favorite(title) {
                $.getJSON('{APP_PATH}api.php?op=add_favorite&title='+encodeURIComponent(title)+'&url='+encodeURIComponent(location.href)+'&'+Math.random()+'&callback=?', function(data){
                        if(data.status==1)        {
                                $("#favorite").html('收藏成功');
                        } else {
                                alert('请登录');
                        }
                });
        }

var picid = <?php echo $currentnum ? $currentnum : 1;?>;

</script>
<script type="text/javascript" src="{JS_PATH}show_picture1.js"></script>
<script type="text/javascript" src="{APP_PATH}api.php?op=count&id={$id}&modelid={$modelid}"></script>

{template "content","footer"}